package com.ruoyi.api.zero;

import com.ruoyi.redis.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/api/zeroCommon")
@RestController
public class ZeroCommonController {
  @Autowired
  private RedisService redisService;
  @GetMapping("/redis/del")
  public void redisDel(String key) {
    redisService.del(key);
  }
  @GetMapping("/redis/get")
  public Object redisGet(String key) {
    return redisService.get(key);
  }
  @PostMapping("/redis/set")
  public Object redisSet(String key,String value) {
    return redisService.set(key,value);
  }

}
